package pl.edu.agh.uddiProxy.types;

import javax.persistence.Column;
import javax.persistence.Table;

import org.hibernate.annotations.AccessType;

@AccessType("field")
@javax.persistence.Entity
@Table(name = "parameterValue")
public class ParameterValue extends Entity {
	@Column(name = "name", nullable = false)
	private String name;
	@Column(name = "value", nullable = false)
	private String value;
	@Column(name = "numberOfMeasurements", nullable = false)
	private long numberOfMeasurements;
	
	public ParameterValue() {
	}

	public ParameterValue(String name, String value) {
		super();
		this.name = name;
		this.value = value;
	}

	public String getName() {
		return name;
	}

	public String getValue() {
		return value;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public long getNumberOfMeasurements() {
		return numberOfMeasurements;
	}

	public void incrementNumberOfMeasurements() {
		numberOfMeasurements++;
	}

	@Override
	public String toString() {
		return name + " " + value + " " + numberOfMeasurements;
	}
}
